const http = uni.$u.http

// 获取用户
export const getuser = data => http.get('/user')

// 获取打卡
export const getclock = () => http.get('/check')

// 获取体温
export const gettemperature = () => http.get('/temperature')

// 获取加班信息
export const getovertime = data => http.get('/otinfo')

// 获取请假信息
export const getask = data => http.get('/askinfo')

// 登录
export const postlogin = (name, employee_id) => http.get(`/user?name=${name}&employee_id=${employee_id}`);

// 根据 employee_id 查询请假记录
export const postaskrecord = data => http.get(`/askinfo?employee_id=${data}`)

// 根据 employee_id 查询加班记录
export const postotrecord = data => http.get(`/otinfo?employee_id=${data}`)

// 添加请假记录
export const postaskinfo = data => http.post('/askinfo', data);

// 添加加班记录
export const postotinfo = data => http.get('/otinfo')

// 根据employee_id 查询打卡记录
export const postclockrecord = data => http.get('/check?employee_id='+data)

// 根据employee_id 查询体温记录
export const posttemrecord = data => http.get('/temperature?employee_id='+data)

// 添加打卡记录
export const postclockinfo = data => http.post('/check',data)

// 添加体温记录
export const postteminfo = data => http.post('/temperature',data)

